<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/axios.min.js"></script>
</head>
<body>
    <input type="text" name="" id="">
    <button>删除</button>
    <script>
        let uid = localStorage.getItem('uid')
        let btn = document.querySelector('button');
        btn.onclick = () => {
            let DelURL = `http://jx.xuzhixiang.top/ap/api/cart-delete.php`
            let pid = document.querySelector('input').value;
            axios.get(DelURL, {
                params: {
                    uid, pid
                }
            }).then(function (res) {
                console.log(res.data);
            }).catch()
        }
    </script>
</body>
</html>